<?php
	include('config/config.php');
	include('config/funcs.php');
	global $CONFIG;
// connect to the database
	$link = mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']);

/* check database connection */
	if (!$link) {
		           die('Not connected : ' . mysql_error());
	}

	$delDb = $_GET['delDb'];
	
	$dbQuery="DROP DATABASE ".$delDb;
	$result = mysql_query($dbQuery) or die('dbquery failed: '.mysql_error());
	
	if (!$result) {
			echo "Somethin aint right, Jimbo! ".mysql_error();
			echo "<a href=\"index.php\">Back</a>";
	}
	else {
			echo "YAY! Database DROPPED!";
			echo "<a href=\"index.php\">Back</a>";
	}

